package com.ggs.starbug.consumer.dead;

import com.google.gson.Gson;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;

/**
 * @Author lianghaohui
 * @Date 2021/12/29 14:27
 * @Description 正常的消费者，这里只创建类，不设置监听，测试消息进入队列后，没有人处理，超时后进入死信交换机-死信队列-死信队列绑定的消费者
 */
@Slf4j
@Configuration
public class NormalConsumer {

    @Autowired
    private Gson gson;

//    @RabbitHandler
//    @RabbitListener(queues = QUEUE_A, ackMode = "MANUAL")
//    public void normalConsumer(@Payload User user, @Headers Map<String, Object> headers, Channel channel, Message message) throws IOException {
//        log.info("进入普通队列...");
//        log.info("数据:{}", gson.toJson(user));
//        channel.basicAck(message.getMessageProperties().getDeliveryTag(), false);
//    }

}
